<?php

namespace Forum\ForumBundle\Entity;

/**
 * @orm:Entity
 * @orm:Table(name="CategorieTopic")
 */
class CategorieTopic {
    /**
     *
     * @orm:ID
     * @orm:Column(type="integer")
     * @orm:GeneratedValue(strategy="AUTO")
     */
    protected  $id_categorie;

    /**
     *
     * @orm:Column(type="string", length="100")
     */
    protected $nom_categorie;

    /**
     * @orm:ManyToOne(targetEntity="CategorieTopic", inversedBy="enfants")
     * @orm:JoinColumn(name="parent", referencedColumnName="id_categorie")
     */
    protected $parent;

    /**
     * @orm:OneToMany(targetEntity="CategorieTopic", mappedBy="parent")
     */
    protected $enfants;


    /**
     * @orm:OneToMany(targetEntity="Topic", mappedBy="CategorieTopic")
     */
    protected $topics;

    /**
     *
     * @orm:ManyToOne(targetEntity="Blog\PostBundle\Entity\Labo", inversedBy="categories_topic")
     * @orm:JoinColumn(name="labo", referencedColumnName="id_labo")
     */
    protected $labo;

    function __construct(){
       $this->topics = new \Doctrine\Common\Collections\ArrayCollection();
       $this->enfants = new \Doctrine\Common\Collections\ArrayCollection();

    }

    public function getNom_categorie() {
        return $this->nom_categorie;
    }

    public function setNom_categorie($nom_categorie) {
        $this->nom_categorie = $nom_categorie;
    }

    public function getParent() {
        return $this->parent;
    }

    public function setParent($parent) {
        $this->parent = $parent;
    }

    public function getTopics() {
        return $this->topics;
    }

    public function setTopics($topics) {
        $this->topics = $topics;
    }

    public function getLabo() {
        return $this->labo;
    }

    public function setLabo($labo) {
        $this->labo = $labo;
    }
    public function getId_categorie() {
        return $this->id_categorie;
    }
    public function getEnfants() {
        return $this->enfants;
    }

    public function setEnfants($enfants) {
        $this->enfants = $enfants;
    }




}

?>
